(last-sexp-toggle-display): Fixed cursor position when toggle abbreviated
authorEli Zaretskii <eliz@gnu.org>
Sat, 20 Jan 2007 15:42:57 +0000 (15:42 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sat, 20 Jan 2007 15:42:57 +0000 (15:42 +0000)
display.

lisp/emacs-lisp/lisp-mode.el

index a58ecb256ac96b969a0f9eade9de62d6707ddf20..3a501ea85c175115f40b85d49260cfaf8bc09263 100644 (file)
@@ -490,6 +490,8 @@ alternative printed representations that can be displayed."
              (point (point)))
          (delete-region beg end)
          (insert (nth 1 value))
+         (or (= beg point)
+             (setq point (1- (point))))
          (last-sexp-setup-props beg (point)
                                 (nth 0 value)
                                 (nth 2 value)